Array.from =
  Array.from ||
  function(r) {
    [].slice.call(r);
  };

import Oidc from "oidc-client";
import environment from "@/environment/index";
const config = {
  authority: environment.authorityUrl,
  client_id: environment.clientId,
  redirect_uri: environment.redirectUrl,
  response_type: "code",
  userStore: new Oidc.WebStorageStateStore({ store: window.localStorage }),
  scope: environment.scope,
  post_logout_redirect_uri: environment.logoutRedirectUri,
  automaticSilentRenew: true,
  silent_redirect_uri: environment.silentRedirectUri,
  accessTokenExpiringNotificationTime: 5
};
const mgr = new Oidc.UserManager(config);
export default mgr;
